<?php
class Userseller extends CS_Controller
{
    function _init()
    {
        $this->load->helper(array('common'));
        $this->load->library('pagination');
        $this->load->model('tourism_order_model', 'tourism_order');
        $this->load->model('pay_method_model', 'pay_method');
    }

    /**
     * 商品用户销售统计
     * @param number $pg
     */
    function tourism($pg = 1)
    {
        $page_num = 20;
        $num = ($pg-1)*$page_num;
        $config['first_url'] = base_url('userseller/tourism').$this->pageGetParam($this->input->get());
        $config['suffix'] = $this->pageGetParam($this->input->get());
        $config['base_url'] = base_url('userseller/tourism');
        $config['total_rows'] = $this->tourism_order->tourismUserSellerTotal($this->input->get())->num_rows();
        $config['uri_segment'] = 3;
        $this->pagination->initialize($config);
        $data['pg_link'] = $this->pagination->create_links();
        $data['resultObj'] = $this->tourism_order->tourismUserSellerList($page_num, $num, $this->input->get());
        $data['all_rows'] = $config['total_rows'];
        $data['pg_now'] = $pg;
        $data['pay_method'] = $this->pay_method->getAllBankId();
        $this->load->view('userseller/tourism', $data);
    }
}